import axios from '@/network/axios'

export const login = ({
  account,
  password
}) => {
  const data = {
    account,
    password
  }
  return axios.request({
    url: 'sys/login',
    data: data,
    method: 'post'
  })
}

export const changePassWord = ({
  account,
  password,
  newPassword
}) => {
  const data = {
    account,
    password,
    newPassword
  }
  return axios.request({
    url: 'sys/updatePassword',
    data: data,
    method: 'post'
  })
}

export const getUserInfo = () => {
  return axios.request({
    url: 'sys/getCurrentInfo',
    params: {},
    method: 'get'
  })
}
